# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年08月20日
"""
from docx import Document
from docx.enum.table import WD_CELL_VERTICAL_ALIGNMENT #导入单元格垂直对齐
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT # 导入段落对齐
from docx.shared import Cm # 导入单位转换函数


file = Document('./练习/09 结果05.docx')
table = file.tables[0]
cell = table.cell(0, 1)

cell.vertical_alignment = WD_CELL_VERTICAL_ALIGNMENT.TOP
cell.paragraphs[0].alignment = WD_PARAGRAPH_ALIGNMENT.CENTER



file.save('./练习/11结果02.docx')

